The present invention relates generally to texture mapping systems and, more particularly, to a new and improved method and apparatus for mapping texture which creates an image through a technique of texture mapping in an instrument using computer graphics such as video game apparatus, graphic computers and like instruments.
Heretofore, in home TV game apparatus, personal computers, graphic computers and the like, an image generating unit has been used to create data of an image being outputted and displayed, i.e., displayed output image data appearing in TV receivers, monitor receivers, or CRT display units and the like. In such image generating units, there is provided an exclusive image-formation unit between a CPU and a frame buffer so as to realize high-speed processing.
In the image generating unit described above, the CPU does not directly access the frame buffer, but issues an image-formation instruction to the image-formation unit to prepare a fundamental figure, such as fundamental triangles and quadrangles. Then, the image-formation unit interprets the instruction issued from the CPU to form an image in the frame buffer. A minimum unit of a figure treated in the image-formation unit is referred to as a polygon or primitive. An instruction to form such a primitive image is referred to as an image-formation instruction.
For example, if a three-dimensional object OB is displayed, the object OB may be divided into three parts, each part constituting a primitive and the CPU issues necessary image-formation instructions corresponding to each of those primitives to the image-formation unit.
Next, in order to enhance similarity between the thus formed image and the object, a so-called technique of texture mapping is frequently employed in the data processing.
Texture mapping is a technique for adding a surface texture pattern to a surface of the polygon forming the object, the texture pattern being a two-dimensional image independently prepared as a texture source image as shown.
A known technique of high-speed texture mapping with a minimum circuit size is a so-called linear transformation. In the linear transformation, coordinates B (u, v) of the texture source image corresponding to a point A (x, y) within the polygon are calculated as follows: EQU u=ax+by EQU v=cx+dy
where each of a, b, c and d is a constant depending on a shape of the polygon. In texture mapping using the linear transformation, mapping or transformation to a shape other than parallelograms causes a diagonal image deformation.
Another known technique of texture mapping for releasing the image from such diagonal image deformation due to the linear transformation is a quadratic transformation. In this quadratic transformation, the coordinates B (u, v) of the texture source image corresponding to the point A (x, y) within the polygon are calculated as follows: EQU u=ax+bxy+cy EQU v=dx+exy+fy
where each of a, b, c, d, e and f is a constant depending on a shape of the polygon. Although this technique of texture mapping using the quadratic transformation is larger in computational volume than that of texture mapping using the linear transformation, it is capable of providing a naturally mapped image. However, even this technique of texture mapping using the quadratic transformation can not make the image look solid. In this regard, the image fails to provide a perspective view in depth, i.e., in a direction perpendicular to the paper.
An additional known technique for completely solving the above problem is a so-called perspective transformation. In the perspective transformation, the coordinates B (u, v) of the texture source image corresponding to a point A (x, y, z) within the polygon are calculated as follows: EQU u=(ax+by)/z EQU v=(cx+dy)/z
where each of a, b, c and d is a constant depending on a shape of the polygon. As is clear from the above, in calculation of the texture mapping using the perspective transformation, there is required depth information (z) before the polygon is projected onto a computer screen. Further, in this calculation, there is additionally required a division process for each of the points to be subjected to the texture mapping. Although this perspective transformation is not realistic in real-time systems, it is capable of preparing a very naturally mapped solid image.
In the texture mapping using the linear transformation described above, when mapping or transformation to a shape other than parallelograms is performed, the diagonal image deformation occurs. This is a problem inherent in the linear transformation.
Further, in the texture mapping using the quadratic transformation, it is possible to obtain a naturally mapped image. However, the thus obtained image fails to provide a perspective view in depth, i.e., in a direction perpendicular to the paper. This is a problem inherent in the quadratic transformation.
In the texture mapping using the perspective transformation described above, it is possible to obtain a very naturally mapped solid image. However, in calculation of the texture mapping using the perspective transformation, there is required depth information (z) before the polygon is projected onto a computer screen. Further, in this calculation, there is additionally required a division process for each of the points to be subjected to the texture mapping. Consequently, the perspective transformation is not realistic in real-time systems. This is a problem inherent in the perspective transformation.
Accordingly, there has been a long existing need for enhanced image processing providing for simplified texture mapping transformation with reduced image distortion and minimal required calculation. The present invention clearly fulfills these needs.